<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>

<style type="text/css">
body {
    background: #F4F4F8
}
.weixin-tip {
    display: none;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    position: absolute;
    top: 45px;
    right: 30px;
    padding: 130px 0 0;
    text-align: left;
    background: url() no-repeat right top;
    background-size: 90px 136px
}
.weixin-tip-img {
    display: none;
    padding: 110px 0 0
}
.weixin-tip-img::after {
    display: block;
    margin: 15px auto;
    content: ' ';
    background-size: cover
}
.weixin-tip-img.iphone::after {
    width: 150px;
    height: 150px;
    background-image: url()
}

.weixin-tip-img.android::after {
    width: 173px;
    height: 240px;
    background-image: url()
}
</style>
</head>
<body>
	<div class="J-weixin-tip weixin-tip" id="tips" style="display: none;">
        <div class="weixin-tip-content" style="font-size: 45px; margin-right: 120px;">
		            请在菜单中选择在浏览器中打开,<br/>
		            以完成支付
        </div>
    </div>
	<div class="aliPayFrom"></div>
</body>
<script type="text/javascript">
	
$(function(){
	
	var id =  getQueryVariable("id");
	
	var ua = navigator.userAgent.toLowerCase();
    var isWeixin = ua.indexOf('micromessenger') != -1;
	
	if (isWeixin) {
		$("#tips").show();
	} else {
		 $.post("Alipay/alipayPayRequestModel.do",{id:id},function(data){
			 $(".aliPayFrom").html(data.data);
		},"json")
	}
})
	
	
	function getQueryVariable(variable)
{
       var query = window.location.search.substring(1);
       var vars = query.split("&");
       for (var i=0;i<vars.length;i++) {
               var pair = vars[i].split("=");
               if(pair[0] == variable){return pair[1];}
       }
       return(false);
}

</script>

</html>